@extends('default.layouts.adminPublic')
@section('title', '企业采集列表')
@section('headcss')
    @parent
    <link rel="stylesheet" href="{{asset('/default/css/admin/indexList.css')}}">
    <link rel="stylesheet" href="{{asset('/default/css/admin/collection.css')}}">
    @endsection
    @section('content')
            <!--导航开始-->
    <div class="crumb_warp">
        <i class="fa fa-home"></i> <a href="{{url('admin/coll_place')}}">首页</a> &raquo; 采集管理
    </div>
    <!--导航结束-->
    <!--结果集标题与导航组件 开始-->
    <div class="con">
        
        <div class="conMain">
            <div class="result_wrap">
                <div class="search">
                    <span style="margin-right: 20px;"><a href="{{url('admin/company_add')}}"><i class="fa fa-plus"></i>添加企业采集</a></span>
                    <span style="margin-right: 20px;"><a href="{{url('admin/company_list')}}"><i
                                    class="fa fa-recycle"></i>企业采集列表</a></span>
                </div>
                <div class="message">
                    <h2>采集中，请稍候...</h2>
                </div>
            </div>
            
            {{--显示演示--}}
            @if(count($companyArr)>0)
                <div class="conInfo">
                    <div class="rinfo">
                        @foreach($companyArr as $v)
                            <dl>
                                <dt>{{$v['companyId']}}</dt>
                                <dd><a href="{{$v['companyUrl']}}" target="_blank">{{$v['companyUrl']}}</a></dd>
                                @if($v['status'] ==1)
                                    <dd class="success">{{$v['msg']}}</dd>
                                @elseif($v['status'] ==2)
                                    <dd class="error">{{$v['msg']}}</dd>
                                @elseif($v['status'] ==3)
                                    <dd class="exist">{{$v['msg']}}</dd>
                                @endif
                            </dl>
                        @endforeach
                    </div>
                </div>
            @endif
            {{--显示演示--}}
            <div id="rtip">
                <span id="jump" class="jump">{{$secs}}</span>秒后自动执行第<strong>{{$page}}</strong>页数据
            </div>
            <div class="conAddList">
                <form method="post" action="{{url('admin/start_company')}}" name="thisForm" id="thisForm">
                    {{csrf_field()}}
                    <input name="url" type="hidden" id="url" value="{{$list_url}}">
                </form>
            </div>
        </div>
    </div>
    <!--结果集标题与导航组件 结束-->
@endsection

@section('footerjs')
    @parent
    <script type="text/javascript">
        var countDown;
        var iNum = '{{$secs}}';
        countDown = setInterval(function(){
            iNum -= 1;
            $('#jump').html(iNum);
            if(iNum <= 0){
                document.thisForm.action = '/admin/start_company?page=' + '{{$page}}';
                document.thisForm.submit();
                clearInterval(countDown);
            }
        }, 1000);
    </script>
@endsection